<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.17"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>libwkhtmltox: src/lib/pdf.h File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">libwkhtmltox
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.17 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="dir_c85d3e3c5052e9ad9ce18c6863244a25.html">lib</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#typedef-members">Typedefs</a> &#124;
<a href="#func-members">Functions</a> &#124;
<a href="#var-members">Variables</a>  </div>
  <div class="headertitle">
<div class="title">pdf.h File Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>Provides C bindings for pdf conversion.  
<a href="#details">More...</a></p>
<div class="textblock"><code>#include &lt;wkhtmltox/dllbegin.inc&gt;</code><br />
<code>#include &lt;wkhtmltox/dllend.inc&gt;</code><br />
</div><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="typedef-members"></a>
Typedefs</h2></td></tr>
<tr class="memitem:a3b311e55a1eacb9f6a91541a0b0c0944"><td class="memItemLeft" align="right" valign="top"><a id="a3b311e55a1eacb9f6a91541a0b0c0944"></a>
typedef struct <a class="el" href="structwkhtmltopdf__global__settings.html">wkhtmltopdf_global_settings</a>&#160;</td><td class="memItemRight" valign="bottom"><b>wkhtmltopdf_global_settings</b></td></tr>
<tr class="separator:a3b311e55a1eacb9f6a91541a0b0c0944"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9ee63a9f472f30a6fc2d7480fd397724"><td class="memItemLeft" align="right" valign="top"><a id="a9ee63a9f472f30a6fc2d7480fd397724"></a>
typedef struct <a class="el" href="structwkhtmltopdf__object__settings.html">wkhtmltopdf_object_settings</a>&#160;</td><td class="memItemRight" valign="bottom"><b>wkhtmltopdf_object_settings</b></td></tr>
<tr class="separator:a9ee63a9f472f30a6fc2d7480fd397724"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa9e3c5e3256dfda0979dfee953840a4b"><td class="memItemLeft" align="right" valign="top"><a id="aa9e3c5e3256dfda0979dfee953840a4b"></a>
typedef struct <a class="el" href="structwkhtmltopdf__converter.html">wkhtmltopdf_converter</a>&#160;</td><td class="memItemRight" valign="bottom"><b>wkhtmltopdf_converter</b></td></tr>
<tr class="separator:aa9e3c5e3256dfda0979dfee953840a4b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a152eb52e87e7ab85533f44fcdc688d4e"><td class="memItemLeft" align="right" valign="top">typedef void(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="pdf_8h.html#a152eb52e87e7ab85533f44fcdc688d4e">wkhtmltopdf_str_callback</a>) (<a class="el" href="structwkhtmltopdf__converter.html">wkhtmltopdf_converter</a> *converter, const char *str)</td></tr>
<tr class="memdesc:a152eb52e87e7ab85533f44fcdc688d4e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Function pointer type used for the error and warning callbacks.  <a href="pdf_8h.html#a152eb52e87e7ab85533f44fcdc688d4e">More...</a><br /></td></tr>
<tr class="separator:a152eb52e87e7ab85533f44fcdc688d4e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9eb2902934ed92714aaf48c4379ed5c4"><td class="memItemLeft" align="right" valign="top">typedef void(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="pdf_8h.html#a9eb2902934ed92714aaf48c4379ed5c4">wkhtmltopdf_int_callback</a>) (<a class="el" href="structwkhtmltopdf__converter.html">wkhtmltopdf_converter</a> *converter, const int val)</td></tr>
<tr class="memdesc:a9eb2902934ed92714aaf48c4379ed5c4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Function pointer type used for the progress_changed and finished callbacks.  <a href="pdf_8h.html#a9eb2902934ed92714aaf48c4379ed5c4">More...</a><br /></td></tr>
<tr class="separator:a9eb2902934ed92714aaf48c4379ed5c4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a34f2b11de61fe99d8365dc5cf547609f"><td class="memItemLeft" align="right" valign="top">typedef void(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="pdf_8h.html#a34f2b11de61fe99d8365dc5cf547609f">wkhtmltopdf_void_callback</a>) (<a class="el" href="structwkhtmltopdf__converter.html">wkhtmltopdf_converter</a> *converter)</td></tr>
<tr class="memdesc:a34f2b11de61fe99d8365dc5cf547609f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Function pointer type used for the phase_changed callback.  <a href="pdf_8h.html#a34f2b11de61fe99d8365dc5cf547609f">More...</a><br /></td></tr>
<tr class="separator:a34f2b11de61fe99d8365dc5cf547609f"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:aae464baff9fa6aa118278b80757066ce"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="pdf_8h.html#aae464baff9fa6aa118278b80757066ce">CAPI</a> (int) wkhtmltopdf_init(int use_graphics)</td></tr>
<tr class="memdesc:aae464baff9fa6aa118278b80757066ce"><td class="mdescLeft">&#160;</td><td class="mdescRight">Setup wkhtmltopdf.  <a href="pdf_8h.html#aae464baff9fa6aa118278b80757066ce">More...</a><br /></td></tr>
<tr class="separator:aae464baff9fa6aa118278b80757066ce"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abf74cbcdfe94dc5bbfb35a4c83d3760b"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="pdf_8h.html#abf74cbcdfe94dc5bbfb35a4c83d3760b">CAPI</a> (const char *) wkhtmltopdf_version()</td></tr>
<tr class="memdesc:abf74cbcdfe94dc5bbfb35a4c83d3760b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return a short utf8 description of a conversion phase.  <a href="pdf_8h.html#abf74cbcdfe94dc5bbfb35a4c83d3760b">More...</a><br /></td></tr>
<tr class="separator:abf74cbcdfe94dc5bbfb35a4c83d3760b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5a4616a330a354c5951430057e355e7e"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="pdf_8h.html#a5a4616a330a354c5951430057e355e7e">CAPI</a> (<a class="el" href="structwkhtmltopdf__global__settings.html">wkhtmltopdf_global_settings</a> *) wkhtmltopdf_create_global_settings()</td></tr>
<tr class="memdesc:a5a4616a330a354c5951430057e355e7e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Create a new global settings object for pdf conversion.  <a href="pdf_8h.html#a5a4616a330a354c5951430057e355e7e">More...</a><br /></td></tr>
<tr class="separator:a5a4616a330a354c5951430057e355e7e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac05baf7b50071366b946038b4fa412a6"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="pdf_8h.html#ac05baf7b50071366b946038b4fa412a6">CAPI</a> (void) wkhtmltopdf_destroy_global_settings(<a class="el" href="structwkhtmltopdf__global__settings.html">wkhtmltopdf_global_settings</a> *)</td></tr>
<tr class="memdesc:ac05baf7b50071366b946038b4fa412a6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destroy a global settings object.  <a href="pdf_8h.html#ac05baf7b50071366b946038b4fa412a6">More...</a><br /></td></tr>
<tr class="separator:ac05baf7b50071366b946038b4fa412a6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab0221a9deb308b653fdf114e1bdbf06f"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="pdf_8h.html#ab0221a9deb308b653fdf114e1bdbf06f">CAPI</a> (<a class="el" href="structwkhtmltopdf__object__settings.html">wkhtmltopdf_object_settings</a> *) wkhtmltopdf_create_object_settings()</td></tr>
<tr class="memdesc:ab0221a9deb308b653fdf114e1bdbf06f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Create an object used to store object settings.  <a href="pdf_8h.html#ab0221a9deb308b653fdf114e1bdbf06f">More...</a><br /></td></tr>
<tr class="separator:ab0221a9deb308b653fdf114e1bdbf06f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ade66be9513ad5b2390ae84a0a2e4e886"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="pdf_8h.html#ade66be9513ad5b2390ae84a0a2e4e886">CAPI</a> (<a class="el" href="structwkhtmltopdf__converter.html">wkhtmltopdf_converter</a> *) wkhtmltopdf_create_converter(<a class="el" href="structwkhtmltopdf__global__settings.html">wkhtmltopdf_global_settings</a> *settings)</td></tr>
<tr class="memdesc:ade66be9513ad5b2390ae84a0a2e4e886"><td class="mdescLeft">&#160;</td><td class="mdescRight">Create a wkhtmltopdf converter object.  <a href="pdf_8h.html#ade66be9513ad5b2390ae84a0a2e4e886">More...</a><br /></td></tr>
<tr class="separator:ade66be9513ad5b2390ae84a0a2e4e886"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a56fa0550c4b23be801ef990d8dfaf73a"><td class="memItemLeft" align="right" valign="top"><a id="a56fa0550c4b23be801ef990d8dfaf73a"></a>
&#160;</td><td class="memItemRight" valign="bottom"><b>CAPI</b> (long) wkhtmltopdf_get_output(<a class="el" href="structwkhtmltopdf__converter.html">wkhtmltopdf_converter</a> *converter</td></tr>
<tr class="separator:a56fa0550c4b23be801ef990d8dfaf73a"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="var-members"></a>
Variables</h2></td></tr>
<tr class="memitem:afcd1706c9144e6d6eee6127661ae3be2"><td class="memItemLeft" align="right" valign="top"><a id="afcd1706c9144e6d6eee6127661ae3be2"></a>
const char *&#160;</td><td class="memItemRight" valign="bottom"><b>name</b></td></tr>
<tr class="separator:afcd1706c9144e6d6eee6127661ae3be2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2acb6da069a6712a3f5ffc4a46715d6f"><td class="memItemLeft" align="right" valign="top">const char const char *&#160;</td><td class="memItemRight" valign="bottom"><b>value</b></td></tr>
<tr class="separator:a2acb6da069a6712a3f5ffc4a46715d6f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0470287e557638636ebc12b18b2e1229"><td class="memItemLeft" align="right" valign="top">const char char int&#160;</td><td class="memItemRight" valign="bottom"><b>vs</b></td></tr>
<tr class="separator:a0470287e557638636ebc12b18b2e1229"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab6e2be62cf7773038f6b1e83de224a81"><td class="memItemLeft" align="right" valign="top"><a class="el" href="pdf_8h.html#a152eb52e87e7ab85533f44fcdc688d4e">wkhtmltopdf_str_callback</a>&#160;</td><td class="memItemRight" valign="bottom"><b>cb</b></td></tr>
<tr class="separator:ab6e2be62cf7773038f6b1e83de224a81"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a169061a6cf49398b442bcd36cf17594d"><td class="memItemLeft" align="right" valign="top"><a id="a169061a6cf49398b442bcd36cf17594d"></a>
<a class="el" href="structwkhtmltopdf__object__settings.html">wkhtmltopdf_object_settings</a> *&#160;</td><td class="memItemRight" valign="bottom"><b>setting</b></td></tr>
<tr class="separator:a169061a6cf49398b442bcd36cf17594d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2055ad7065ecc24f7600ee328c8bff2c"><td class="memItemLeft" align="right" valign="top"><a id="a2055ad7065ecc24f7600ee328c8bff2c"></a>
<a class="el" href="structwkhtmltopdf__object__settings.html">wkhtmltopdf_object_settings</a> const char *&#160;</td><td class="memItemRight" valign="bottom"><b>data</b></td></tr>
<tr class="separator:a2055ad7065ecc24f7600ee328c8bff2c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:accf3aec63bc20b3c99ab4881cb07c05b"><td class="memItemLeft" align="right" valign="top"><a id="accf3aec63bc20b3c99ab4881cb07c05b"></a>
int&#160;</td><td class="memItemRight" valign="bottom"><b>phase</b></td></tr>
<tr class="separator:accf3aec63bc20b3c99ab4881cb07c05b"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Provides C bindings for pdf conversion. </p>
</div><h2 class="groupheader">Typedef Documentation</h2>
<a id="a9eb2902934ed92714aaf48c4379ed5c4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9eb2902934ed92714aaf48c4379ed5c4">&#9670;&nbsp;</a></span>wkhtmltopdf_int_callback</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">wkhtmltopdf_int_callback</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Function pointer type used for the progress_changed and finished callbacks. </p>
<p>For the progress_changed callback the value indicated the progress within the current phase in percent. For the finished callback the value if 1 if the conversion has successful and 0 otherwise.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">converter</td><td>The converter that issued the callback </td></tr>
    <tr><td class="paramname">val</td><td>The integer value</td></tr>
  </table>
  </dd>
</dl>
<dl class="section see"><dt>See also</dt><dd>wkhtmltopdf_set_progress_changed, wkhtmltopdf_set_finished_callback </dd></dl>

</div>
</div>
<a id="a152eb52e87e7ab85533f44fcdc688d4e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a152eb52e87e7ab85533f44fcdc688d4e">&#9670;&nbsp;</a></span>wkhtmltopdf_str_callback</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">wkhtmltopdf_str_callback</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Function pointer type used for the error and warning callbacks. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">converter</td><td>The converter that issued the callback </td></tr>
    <tr><td class="paramname">str</td><td>A utf8 encoded string containing the error or warning message.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section see"><dt>See also</dt><dd>wkhtmltopdf_set_error_callback, wkhtmltopdf_set_warning_callback </dd></dl>

</div>
</div>
<a id="a34f2b11de61fe99d8365dc5cf547609f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a34f2b11de61fe99d8365dc5cf547609f">&#9670;&nbsp;</a></span>wkhtmltopdf_void_callback</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">wkhtmltopdf_void_callback</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Function pointer type used for the phase_changed callback. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">converter</td><td>The converter that issued the callback</td></tr>
  </table>
  </dd>
</dl>
<dl class="section see"><dt>See also</dt><dd>wkhtmltopdf_set_phase_changed_callback </dd></dl>

</div>
</div>
<h2 class="groupheader">Function Documentation</h2>
<a id="abf74cbcdfe94dc5bbfb35a4c83d3760b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#abf74cbcdfe94dc5bbfb35a4c83d3760b">&#9670;&nbsp;</a></span>CAPI() <span class="overload">[1/6]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">CAPI </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Return a short utf8 description of a conversion phase. </p>
<p>Return a short utf8 string indicating progress within a phase.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">converter</td><td>The converter to query </td></tr>
    <tr><td class="paramname">phase</td><td>The number of the conversion step of which we want a description </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>A description of the conversion phase</dd></dl>
<dl class="section see"><dt>See also</dt><dd>wkhtmltopdf_current_phase, wkhtmltopdf_phase_description</dd></dl>
<p>Will typically return a string like "40%"</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">converter</td><td>The converter to query </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>A string containing a progress indication</dd></dl>
<dl class="section see"><dt>See also</dt><dd>wkhtmltopdf_set_progress_changed_callback </dd></dl>

</div>
</div>
<a id="aae464baff9fa6aa118278b80757066ce"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aae464baff9fa6aa118278b80757066ce">&#9670;&nbsp;</a></span>CAPI() <span class="overload">[2/6]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">CAPI </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Setup wkhtmltopdf. </p>
<p>Return the largest HTTP error code encountered during conversion.</p>
<p>Get the total number of phases the conversion process will go trough.</p>
<p>Get the number of the current conversion phase.</p>
<p>Convert the input objects into a pdf document.</p>
<p>Retrieve a setting in a object settings object.</p>
<p>Alter a setting in a object settings object.</p>
<p>Retrieve a setting in a global settings object.</p>
<p>Alter a setting in a global settings object.</p>
<p>Deinit wkhtmltopdf.</p>
<p>Must be called before any other functions.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">use_graphics</td><td>Should we use a graphics system </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>1 on success and 0 otherwise</dd></dl>
<dl class="section see"><dt>See also</dt><dd>wkhtmltopdf_deinit</dd></dl>
<p>Free up resources used by wkhtmltopdf, when this has been called no other wkhtmltopdf function can be called.</p>
<dl class="section return"><dt>Returns</dt><dd>1 on success and 0 otherwise</dd></dl>
<dl class="section see"><dt>See also</dt><dd>wkhtmltopdf_init</dd>
<dd>
<a class="el" href="pagesettings.html#pagePdfGlobal">Pdf global settings</a>, wkhtmltopdf_create_global_settings, wkhtmltopdf_get_global_setting</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">settings</td><td>The settings object to change </td></tr>
    <tr><td class="paramname">name</td><td>The name of the setting </td></tr>
    <tr><td class="paramname">value</td><td>The new value for the setting (encoded in UTF-8) </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>1 if the setting was updated successfully and 0 otherwise.</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="pagesettings.html">Setting</a>, wkhtmltopdf_create_global_settings, wkhtmltopdf_set_global_setting</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">settings</td><td>The settings object to inspect </td></tr>
    <tr><td class="paramname">name</td><td>The name of the setting to read </td></tr>
    <tr><td class="paramname">value</td><td>A buffer of length at least <em>vs</em>, where the value (encoded in UTF-8) is stored. </td></tr>
    <tr><td class="paramname">vs</td><td>The length of <em>value</em> </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>1 If the the setting exists and was read successfully and 0 otherwise</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="pagesettings.html">Setting</a>, wkhtmltopdf_create_object_settings, wkhtmltopdf_get_object_setting</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">settings</td><td>The settings object to change </td></tr>
    <tr><td class="paramname">name</td><td>The name of the setting </td></tr>
    <tr><td class="paramname">value</td><td>The new value for the setting (encoded in UTF-8) </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>1 if the setting was updated successfully and 0 otherwise.</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="pagesettings.html">Setting</a>, wkhtmltopdf_create_global_settings, wkhtmltopdf_set_global_setting</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">settings</td><td>The settings object to inspect </td></tr>
    <tr><td class="paramname">name</td><td>The name of the setting to read </td></tr>
    <tr><td class="paramname">value</td><td>A buffer of length at least <em>vs</em>, where the value is stored (encoded in UTF-8). </td></tr>
    <tr><td class="paramname">vs</td><td>The length of <em>value</em> </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>1 If the the setting exists and was read successfully and 0 otherwise</dd></dl>
<p>This is the main method for the conversion process, during conversion progress information warning, and errors are reported using the supplied call backs. Once the conversion is done the output pdf (or ps) file will be placed at the location of the "out" setting supplied in the global settings object during construction of the converter. If this setting is not supplied or set to the empty string, the output can be retrieved using the wkhtmltopdf_get_output function.</p>
<p>\paragm converter The converter to perform the conversion on.</p>
<dl class="section return"><dt>Returns</dt><dd>1 on success and 0 otherwise</dd></dl>
<p>Conversion is done in a number of named phases, this function will retrieve the number of the current conversion phase, which will be a number between 0 and wkhtmltopdf_phase_count(converter)-1.</p>
<p>The description (name) of any phase can be retrieved by calling the wkhtmltopdf_phase_description method.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">converter</td><td>The converter to find the current phase of </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The current phase of the supplied converter</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">converter</td><td>The converter to query </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The total number of phases in the conversion process</dd></dl>
<dl class="section see"><dt>See also</dt><dd>wkhtmltopdf_current_phase, wkhtmltopdf_phase_description</dd></dl>
<p>Return the largest HTTP code greater than or equal to 300 encountered during loading of any of the supplied objects, if no such error code is found 0 is returned. This function will only return a useful result after wkhtmltopdf_convert has been called.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">converter</td><td>The converter to query </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The HTTP error code. </dd></dl>

</div>
</div>
<a id="ac05baf7b50071366b946038b4fa412a6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac05baf7b50071366b946038b4fa412a6">&#9670;&nbsp;</a></span>CAPI() <span class="overload">[3/6]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">CAPI </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Destroy a global settings object. </p>
<p>add an object (web page to convert)</p>
<p>Set the function that should be called once the conversion has finished.</p>
<p>Set the function that should be called when progress have been done during conversion.</p>
<p>Set the function that should be called whenever conversion changes phase.</p>
<p>Set the function that should be called when an errors occurs during conversion.</p>
<p>Set the function that should be called when an warning message is issued during conversion.</p>
<p>Destroy a wkhtmltopdf converter object.</p>
<p>Normally one would not need to call this since ownership of the settings object is transfarred to the converter.</p>
<p>An object must be destroyed to free up its memory, once it has been destroyed it may no longer be accessed.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">settings</td><td>The converter object to destroy</td></tr>
    <tr><td class="paramname">converter</td><td>The converter object on which warnings we want the callback to be called </td></tr>
    <tr><td class="paramname">cb</td><td>The function to call when warning message is issued</td></tr>
    <tr><td class="paramname">converter</td><td>The converter object on which errors we want the callback to be called </td></tr>
    <tr><td class="paramname">cb</td><td>The function to call when an error occurs</td></tr>
  </table>
  </dd>
</dl>
<p>The number of the new phase can be found by calling wkhtmltopdf_current_phase</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">converter</td><td>The converter which phase change events to call back from </td></tr>
    <tr><td class="paramname">cb</td><td>The function to call when phases change</td></tr>
  </table>
  </dd>
</dl>
<dl class="section see"><dt>See also</dt><dd>wkhtmltopdf_current_phase, wkhtmltopdf_phase_count, wkhtmltopdf_phase_description</dd></dl>
<p>The progress in percent within the current phase is given as an integer to the callback function.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">converter</td><td>The converter which progress events to call back from </td></tr>
    <tr><td class="paramname">cb</td><td>The function to call when progress has occurred.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section see"><dt>See also</dt><dd>wkhtmltopdf_progress_description</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">converter</td><td>The converter which finish events to call back from </td></tr>
    <tr><td class="paramname">cb</td><td>The function to call when the conversion has finished has occurred.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section see"><dt>See also</dt><dd>wkhtmltopdf_convert</dd></dl>
<p>Add the object described by the supplied object settings to the list of objects (web pages to convert), objects are placed in the output pdf in the order of addition. Once the object has been added, the supplied settings may no longer be accessed, it Wit eventually be freed by wkhtmltopdf. If a none NULL and none empty utf8 encoded string is supplied to data, this HTML content will be converted instead of the content located at "page" setting of the supplied object settings instance.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">converter</td><td>The converter to add the object to </td></tr>
    <tr><td class="paramname">settings</td><td>The setting describing the object to add </td></tr>
    <tr><td class="paramname">data</td><td>HTML content of the object to convert (encoded in UTF-8) or NULL </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ade66be9513ad5b2390ae84a0a2e4e886"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ade66be9513ad5b2390ae84a0a2e4e886">&#9670;&nbsp;</a></span>CAPI() <span class="overload">[4/6]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">CAPI </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structwkhtmltopdf__converter.html">wkhtmltopdf_converter</a> *&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Create a wkhtmltopdf converter object. </p>
<p>The converter object is used to convert one or more objects(web sides) into a single pdf. Once a settings object has been parsed, it may no longer be accessed, and will eventually be freed. The returned converter object must be freed by calling wkhtmltopdf_destroy_converter</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">settings</td><td>The global settings to use during conversion. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>A wkhtmltopdf converter object </dd></dl>

</div>
</div>
<a id="a5a4616a330a354c5951430057e355e7e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5a4616a330a354c5951430057e355e7e">&#9670;&nbsp;</a></span>CAPI() <span class="overload">[5/6]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">CAPI </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structwkhtmltopdf__global__settings.html">wkhtmltopdf_global_settings</a> *&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Create a new global settings object for pdf conversion. </p>
<p>Create a new global settings object for pdf conversion, settings can be altered with wkhtmltopdf_set_global_setting, and inspected with wkhtmltopdf_get_global_setting. Once the desired settings have been set a converter object can be created using \reg wkhtmltopdf_create_converter.</p>
<dl class="section return"><dt>Returns</dt><dd>A wkhtmltopdf global settings object </dd></dl>

</div>
</div>
<a id="ab0221a9deb308b653fdf114e1bdbf06f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab0221a9deb308b653fdf114e1bdbf06f">&#9670;&nbsp;</a></span>CAPI() <span class="overload">[6/6]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">CAPI </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structwkhtmltopdf__object__settings.html">wkhtmltopdf_object_settings</a> *&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Create an object used to store object settings. </p>
<p>Create a new Object settings object for pdf conversion, settings can be altered with wkhtmltopdf_set_object_setting, and inspected with wkhtmltopdf_get_object_setting. Once the desired settings have been set the object can be added to a converter by calling wkhtmltopdf_add_resource.</p>
<dl class="section return"><dt>Returns</dt><dd>an object settings instance </dd></dl>

</div>
</div>
<h2 class="groupheader">Variable Documentation</h2>
<a id="ab6e2be62cf7773038f6b1e83de224a81"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab6e2be62cf7773038f6b1e83de224a81">&#9670;&nbsp;</a></span>cb</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">wkhtmltoimage_int_callback cb</td>
        </tr>
      </table>
</div><div class="memdoc">
<b>Initial value:</b><div class="fragment"><div class="line">{</div>
<div class="line">    <span class="keyword">reinterpret_cast&lt;</span>MyPdfConverter *<span class="keyword">&gt;</span>(converter)-&gt;error_cb = cb</div>
</div><!-- fragment -->
</div>
</div>
<a id="a2acb6da069a6712a3f5ffc4a46715d6f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2acb6da069a6712a3f5ffc4a46715d6f">&#9670;&nbsp;</a></span>value</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const char char * value</td>
        </tr>
      </table>
</div><div class="memdoc">
<b>Initial value:</b><div class="fragment"><div class="line">{</div>
<div class="line">    <span class="keywordflow">if</span> (!strcmp(name, <span class="stringliteral">&quot;web.printMediaType&quot;</span>)) {</div>
<div class="line">        name = <span class="stringliteral">&quot;load.printMediaType&quot;</span>;</div>
<div class="line">    }</div>
<div class="line">    <span class="keywordflow">return</span> <span class="keyword">reinterpret_cast&lt;</span>settings::PdfObject *<span class="keyword">&gt;</span>(settings)-&gt;set(name, QString::fromUtf8(value))</div>
</div><!-- fragment -->
</div>
</div>
<a id="a0470287e557638636ebc12b18b2e1229"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0470287e557638636ebc12b18b2e1229">&#9670;&nbsp;</a></span>vs</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const char char int vs</td>
        </tr>
      </table>
</div><div class="memdoc">
<b>Initial value:</b><div class="fragment"><div class="line">{</div>
<div class="line">    QString res = <span class="keyword">reinterpret_cast&lt;</span>settings::PdfObject *<span class="keyword">&gt;</span>(settings)-&gt;get(name)</div>
</div><!-- fragment -->
</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.17
</small></address>
</body>
</html>
